package com.huak.heatmap.controller;

import com.huak.heatmap.entity.CompanyPosition;
import com.huak.heatmap.service.CompanyPositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author liuhuan
 * @date 2018/10/26 17:33
 * @description
 */
@RestController
@RequestMapping("/city")
public class CompanyPositionController {

    @Autowired
    private CompanyPositionService companyPositionService;

    @GetMapping("/{id}")
    public List<CompanyPosition> findByCity(@PathVariable("id") String city) {
        return companyPositionService.findByCity(city);
    }
}
